import { createRouter, createWebHistory } from 'vue-router'
const router = createRouter({
  history: createWebHistory(),
  routes: [
    // {//测试路由
    //   path: '/test',
    //   name: 'test',
    //   component: () => import('../test/test.vue'),
    // },
    {
      path: '/',
      name: 'login',
      component: () => import('../components/login/login.vue'),
    },
    /* 管理员端路由说明：一共两层路由，第一层是基础工作，突出工作，分数总览，个人中心页面以及对应的打分页或详情页，第二层是进行中和已完成页面 */
    {//管理端总入口
      path: '/administrator',
      name: 'administrator',
      component: () => import('../components/administrator/adm.vue'),
      children: [
        {//基础工作
          path: '',
          name: 'adm-baseWork',
          component: () => import('../components/administrator/BaseWork.vue'),
          children: [
            {//基础工作的进行中
              path: '',
              name: 'adm-baseWorkProceed',
              component: () => import('../components/administrator/pages/BaseWorkProceed.vue'),
            },
            {//基础工作的已完成
              path: 'finish',
              name: 'baseWorkFinish',
              component: () => import('../components/administrator/pages/BaseWorkFinish.vue'),
            },
          ]
        },
        {//基础工作的进行中打分页
          path: 'baseWork/proceed/detail',
          name: 'adm-baseWorkProceedDetail',
          component: () => import('../components/administrator/pages/BaseWorkProceedDetail.vue'),
        },
        {//基础工作的已完成打分页
          path: 'baseWork/finish/detail',
          name: 'adm-baseWorkFinishDetail',
          component: () => import('../components/administrator/pages/BaseWorkFinishDetail.vue'),
        },
        {//突出工作
          path: 'outstandingWork',
          name: 'adm-outstandingWork',
          component: () => import('../components/administrator/OutstandingWork.vue'),
          children: [
            {//突出工作的进行中
              path: '',
              name: 'outstandingProceed',
              component: () => import('../components/administrator/pages/OutstandingWorkProceed.vue'),
            },
            {//突出工作的已完成
              path: 'finish',
              name: 'outstandingFinish',
              component: () => import('../components/administrator/pages/OutstandingWorkFinish.vue'),
            }
          ]
        },
        {//突出工作的进行中班级详情
          path: 'outstandingWork/proceed/detail',
          name: 'adm-outstandingWorkProceedDetail',
          component: () => import('../components/administrator/pages/OutstandingWorkProceedDetail.vue'),
        },
        {//突出工作的进行中班级详情打分页
          path: 'outstandingWork/proceed/detail/mark',
          name: 'adm-outstandingWorkProceedDetailScoring',
          component: () => import('../components/administrator/pages/OutstandingWorkProceedDetailMark.vue'),
        },
        {//突出工作的已完成详情
          path: 'outstandingWork/finish/detail',
          name: 'adm-outstandingWorkFinishDetail',
          component: () => import('../components/administrator/pages/OutstandingWorkFinishDetail.vue'),
        },
        {//突出工作的已完成班级详情打分页
          path: 'outstandingWork/finish/detail/mark',
          name: 'adm-outstandingWorkFinishDetailScoring',
          component: () => import('../components/administrator/pages/OutstandingWorkFinishDetailMark.vue'),

        },
        {//分数总览
          path: '/administrator/scoreOverview',
          name: 'adm-scoreOverview',
          component: () => import('../components/administrator/ScoreOverview.vue'),
          children: [
            {
              path: '',
              name: 'adm-scoreOverviewProceed',
              component: () => import('../components/administrator/pages/ScoreOverviewProceed.vue'),
            },
            {
              path: 'finish',
              name: 'adm-scoreOverviewFinish',
              component: () => import('../components/administrator/pages/ScoreOverviewFinish.vue'),
            }
          ]
        },
        {//分数总览的进行中详情
          path: 'scoreOverview/proceed/detail',
          name: 'adm-scoreOverviewProceedDetail',
          component: () => import('../components/administrator/pages/ScoreOverviewProceedDetail.vue'),
        },
        {//分数总览的已完成详情
          path: 'scoreOverview/finish/detail',
          name: 'adm-scoreOverviewFinishDetail',
          component: () => import('../components/administrator/pages/ScoreOverviewFinishDetail.vue'),
        },
        {//个人中心
          path: 'user',
          name: 'adm-user',
          component: () => import('../components/administrator/User.vue'),
        }
      ]
    },
    {//超级管理员端
      path: '/superAdministrator',
      name: 'superAdministrator',
      component: () => import('../components/superAdministrator/superAdm.vue'),
      children: [
        {//任务发布
          path: '',
          name: 'superAdm-task',
          component: () => import('../components/superAdministrator/task.vue'),
        },
        {//任务发布的学业情况详情
          path: 'task/studyDetail',
          name: 'superAdm-taskStudyDetail',
          component: () => import('../components/superAdministrator/pages/taskStudyDetail.vue'),
        },
        {//任务发布的基础工作详情
          path: 'task/baseWorkDetail',
          name: 'superAdm-taskBaseWorkDetail',
          component: () => import('../components/superAdministrator/pages/taskBaseWorkDetail.vue'),
        },
        {//分数总览
          path: '/superAdministrator/scoreOverview',
          name: 'superAdm-scoreOverview',
          component: () => import('../components/superAdministrator/ScoreOverview.vue'),
          children: [
            {
              path: '',
              name: 'superAdm-scoreOverviewProceed',
              component: () => import('../components/superAdministrator/pages/ScoreOverviewProceed.vue'),
            },
            {
              path: 'finish',
              name: 'superAdm-scoreOverviewFinish',
              component: () => import('../components/superAdministrator/pages/ScoreOverviewFinish.vue'),
            }
          ]
        },
        {//分数总览的进行中详情
          path: 'scoreOverview/proceed/detail',
          name: 'superAdm-scoreOverviewProceedDetail',
          component: () => import('../components/superAdministrator/pages/ScoreOverviewProceedDetail.vue'),
        },
        {//分数总览的已完成详情
          path: 'scoreOverview/finish/detail',
          name: 'superAdm-scoreOverviewFinishDetail',
          component: () => import('../components/superAdministrator/pages/ScoreOverviewFinishDetail.vue'),
        },
        {//分数总览-基础工作的进行中打分页
          path: 'baseWork/proceed/detail',
          name: 'superAdm-baseWorkProceedDetail',
          component: () => import('../components/superAdministrator/pages/BaseWorkProceedDetail.vue'),
        },
        {//分数总览-基础工作的已完成打分页
          path: 'baseWork/finish/detail',
          name: 'superAdm-baseWorkFinishDetail',
          component: () => import('../components/superAdministrator/pages/BaseWorkFinishDetail.vue'),
        },
        {//分数总览-突出工作的进行中班级详情
          path: 'outstandingWork/proceed/detail',
          name: 'superAdm-outstandingWorkProceedDetail',
          component: () => import('../components/superAdministrator/pages/OutstandingWorkProceedDetail.vue'),
        },
        {//分数总览-突出工作的进行中班级详情打分页
          path: 'outstandingWork/proceed/detail/mark',
          name: 'superAdm-outstandingWorkProceedDetailScoring',
          component: () => import('../components/superAdministrator/pages/OutstandingWorkProceedDetailMark.vue'),
        },
        {//分数总览-突出工作的已完成详情
          path: 'outstandingWork/finish/detail',
          name: 'superAdm-outstandingWorkFinishDetail',
          component: () => import('../components/superAdministrator/pages/OutstandingWorkFinishDetail.vue'),
        },
        {//分数总览-突出工作的已完成班级详情打分页
          path: 'outstandingWork/finish/detail/mark',
          name: 'superAdm-outstandingWorkFinishDetailScoring',
          component: () => import('../components/superAdministrator/pages/OutstandingWorkFinishDetailMark.vue'),
        },
        {//管理员管理
          path: "adm",
          name: "superAdm-adm",
          component: () => import('../components/superAdministrator/adm.vue'),
        },
        {//管理员编辑
          path: "adm/admEdit",
          name: "superAdm-admEdit",
          component: () => import('../components/superAdministrator/pages/AdmAdmEdit.vue'),
        },
        {//教师管理
          path: "teacher",
          name: "superAdm-teacher",
          component: () => import('../components/superAdministrator/teacher.vue'),
        },
        {//教师编辑
          path: "teacher/teacherEdit",
          name: "superAdm-teacherEdit",
          component: () => import('../components/superAdministrator/pages/TeacherTeacherEdit.vue'),
        },
        {//学生管理
          path: "student",
          name: "superAdm-student",
          component: () => import('../components/superAdministrator/student.vue'),
        },
        {//学生编辑
          path: "student/studentEdit",
          name: "superAdm-studentEdit",
          component: () => import('../components/superAdministrator/pages/StudentStudentEdit.vue'),
        },
        {//个人中心
          path: 'user',
          name: 'superAdm-user',
          component: () => import('../components/superAdministrator/user.vue'),
        }
      ]
    },
    // 学生端
    {
      path: '/student',
      name: 'student',
      component: () => import('../components/student/student.vue'),
      // meta:{
      //   needauth:true,
      // },
      children:[
        {
          // 重定向
          path:'/student',
          redirect:'/student/studentSituation/studentSituationProceed'
        },
        {
          path:'studentSituation',
          name:'studentSituation',
          component:() => import('../components/student/studentSituation.vue'),
          children:[
            {
              // 重定向
              path:'/student/studentSituation',
              redirect:'/student/studentSituation/studentSituationProceed'
            },
            {
              // 学生情况进行中
              path:'studentSituationProceed',
              name:'studentSituationProceed',
              component:() => import('../components/student/studentSituationStarting.vue')
            },
            {
              // 学生情况已完成
              path:'studentSituationFinish',
              name:'studentSituationFinish',
              component:() => import('../components/student/studentSituationFinish.vue')
            },
            {
              // 学生情况进行中的详情
              path:'studentSituationDetail',
              name:'studentSituationDetail',
              component:() => import('../components/student/studentSituationDetail.vue'),
              meta:{title:'填报详情'}
            },
            {
              // 学生情况已完成的详情
              path:'finishDetail',
              name:'stufinishDetail',
              component:() => import('../components/student/studentFinishDetail.vue'),
              meta: {title:'填报详情'}
            },
          ]
        },
        {
          // 个人中心
          path:'studentUser',
          name:'studentUser',
          component:() => import('../components/student/studentUser.vue')
        }
      ]
    },
    // 学业导师端
    {
      path:'/mentor',
      name:'mentor',
      component:() => import('../components/mentor/mentor.vue'),
      children:[
        {
          // 重定向
          path:'/mentor',
          redirect:'/mentor/mentorLog/mlogMain'
        },
        {
          // 导师日志
          path:'mentorLog',
          name:'mentorLog',
          component:() => import('../components/mentor/mLog/mlog.vue'),
          children:[
            {
              // 重定向
              path:'/mentor/mentorLog',
              redirect:'/mentor/mentorLog/mlogMain'
            },
            // 导师日志首页
            {
              path:'mlogMain',
              name:'mlogMain',
              component:() =>import('../components/mentor/mLog/mlogMain.vue'),
            },
            // 导师日志详情页
            {
              path:'mlogDetail',
              name:'mlogDetail',
              component:() =>import('../components/mentor/mLog/mlogDetail.vue'),
            },
            // 上传新日志
            {
              path:'mlogUpdate',
              name:'mlogUpdate',
              component:() =>import('../components/mentor/mLog/mlogUpdate.vue'),
            },
          ]
        },
        {
          // 基础工作
          path:'mentorBasic',
          name:'mentorBasic',
          component:() => import('../components/mentor/mentorBasic.vue'),
          children:[
            {
              // 基础工作重定向
              path:'/mentor/mentorBasic',
              redirect:'/mentor/mentorBasic/proceed',
              meta:{title:'详情'}
            },
            {
              //基础工作进行中
              path:'proceed',
              name:'proceed',
              component:() => import('../components/mentor/mBasicProceed.vue')
            },
            {
              //基础工作进行中的详情页
              path:'proceedDetail',
              name:'proceedDetail',
              component:() => import('../components/mentor/mBasicProceedDetail.vue')
            },

            {
              //基础工作已完成
              path:'finish',
              name:'finish',
              component:() => import('../components/mentor/mBasicFinish.vue'),
              meta:{title:'查看详情'}
            },
            {
              //基础工作已完成的详情页
              path:'finishDetail',
              name:'finishDetail',
              component:() => import('../components/mentor/mBasicFinishDetail.vue')
            },
          ]
        },
        {
          // 学业情况
          path:'mentorSituation',
          name:'mentorSituation',
          component:() => import('../components/mentor/mentorSituation.vue'),
          children: [
            {
              // 学业情况重定向
              path:'/mentor/mentorSituation',
              redirect:'/mentor/mentorSituation/mSituationProceed'
            },
            {
              // 学业情况的进行中
              path:'mSituationProceed',
              name:'mSituationProceed',
              component:() => import('../components/mentor/mSituationProceed.vue')
            },
            {
              // 学业情况的已完成
              path:'mSituationFinish',
              name:'mSituationFinish',
              component:() => import('../components/mentor/mSituationFinish.vue')
            },
            {
              // 学业情况的详情页
              path:'mSituationDetail',
              name:'mSituationDetail',
              component:() => import('../components/mentor/mSituationDetail.vue'),
              meta:{title:'详情'}
            },
          ]
        },
        {
          // 班级管理
          path:'mentorClass',
          name:'mentorClass',
          component:() => import('../components/mentor/mClassMain.vue'),
          children: [
            {
              // 班级管理重定向
              path:'/mentor/mentorClass',
              redirect:'/mentor/mentorClass/mClass'
            },
            {
              // 班级管理页面
              path:'mClass',
              name:'mClass',
              component:() => import('../components/mentor/mentorClass.vue'),
            },
            {
              // 班级管理的详情页
              path:'mClassDetail',
              name:'mClassDetail',
              component:() => import('../components/mentor/mClassDetail.vue'),
            },
          ]
        },
        
        {
          // 个人中心
          path:'mentorUser',
          name:'mentorUser',
          component:() => import('../components/mentor/mentorUser.vue')
        },
      ]
    }
  ],
})

export default router
